import request from '@/utils/request.js';
import { rsaEncrypt } from '@/utils/commonUtil3';
// 查询分类树结构
export const reqCategoryTree = () => request({ url: '/category/select/storeTree', method: 'GET' });
// 根据分类查询门店商品
export const reqGoodsByCategory = data => request({ url: '/commodity/selectByCategory', method: 'GET', params: data });
// 根据id查询商品详情
export const reqGoodsDetail = data => request({ url: '/commodity/selectDetails', method: 'GET', params: data });
// 修改多规格售价
export const reqUpdatePrice = data => request({ url: '/commodity/updateSpecification', method: 'PUT', data: { data: rsaEncrypt(data) } });
// 获取多规格商品
export const reqGetMoreStandard = data => request({ url: '/commodity/selectSpecification', method: 'GET', params: data });
// 添加点采项信息
export const reqAddPurchase = data => request({ url: '/pick/insert', method: 'post', data: { data: rsaEncrypt(data) } });
// 查看待提交点采项
export const reqPurchaseWait = data => request({ url: '/pick/select', method: 'GET', params: data });
// 删除点采商品项
export const reqDelPurchaseItem = data => request({ url: '/pick/delete', method: 'DELETE', data: { data: rsaEncrypt(data) } });
// 提交点采订单
export const reqSubmitPurchase = data => request({ url: '/pick/insertStorePickOrder', method: 'POST', data: { data: rsaEncrypt(data) } });
// 删除点采
export const reqDelPurchaseList = data => request({ url: '/pick/deleteList', method: 'DELETE', data: { data: rsaEncrypt(data) } });
// 查看点采订单列表
export const reqPurchaseList = data => request({ url: '/pick/selectStorePickOrder', method: 'GET', params: data });
// 修改点采单信息
export const reqEditPurchase = data => request({ url: '/pick/updateStorePickOrder', method: 'POST', data: { data: rsaEncrypt(data) } });
// 查看点采退货订单列表
export const reqReturnOrder = data => request({ url: '/returnsOrder/select', method: 'GET', params: data });
// 查看点采退货详情
export const reqReturnOrderDetail = data => request({ url: '/returnsOrder/selectStoreReturnsList', method: 'GET', params: data });
// 修改点采订单
export const reqEditReturnOrder = data => request({ url: '/returnsOrder/update', method: 'PUT', data: { data: rsaEncrypt(data) } });
// 分页查询门店入库记录
export const reqInwarehouseRec = data => request({ url: '/inbound/select', method: 'GET', params: data });
// 获取随货单信息
export const reqFollowInfo = data => request({ url: '/followOrder/selectByNumber', method: 'GET', params: data });
// 添加入库记录
export const reqAddInwarehouse = data => request({ url: '/inbound/insert', method: 'POST', data: { data: rsaEncrypt(data) } });
// 查询标品随货入库详情
export const reqFollowDetail = data => request({ url: '/inbound/selectDetails', method: 'GET', params: data });
// 查询已入库单退货前详情
export const reqFollowReturnDetail = data => request({ url: '/returnsOrder/selectStoreInbound', method: 'GET', params: data });
// 添加点采退货订单
export const reqAddFollowReturn = data => request({ url: '/returnsOrder/insert', method: 'POST', data: { data: rsaEncrypt(data) } });
// 门店非标入库记录
export const reqNoStandardList = data => request({ url: '/nonstandard/inbound/select', method: 'GET', params: data });
// 门店非标入库记录详情
export const reqNoStandardDetail = data => request({ url: '/nonstandard/inbound/details', method: 'GET', params: data });
// 新增门店非标入库记录
export const reqAddStandardInwarehouse = data => request({ url: '/nonstandard/inbound/insert', method: 'POST', data: { data: rsaEncrypt(data) } });
// 根据名称查询非标商品
export const reqNoStandardByName = data => request({ url: '/nonstandard/Commodity/selectByName', method: 'GET', params: data });
// 分页查询自营入库列表
export const reqSelfList = data => request({ url: '/self/inbound/select', method: 'GET', params: data });
// 查询自营入库记录详情
export const reqSelfDetail = data => request({ url: '/self/inbound/selectDetails', method: 'GET', params: data });
// 新增自营入库记录
export const reqSelfInwarehouse = data => request({ url: '/self/inbound/insert', method: 'POST', data: { data: rsaEncrypt(data) } });
// 自营入库查询自营商品
export const reqSelfByNameOrBarCode = data => request({ url: '/self/inbound/selectSelfCommodity', method: 'GET', params: data });
// 分账流水列表
export const reqDivideList = data => request({ url: '/divide/getList', method: 'GET', params: data });
// 销售报表合计
export const reqSaleCount = data => request({ url: '/divide/getSalesInfo', method: 'GET', params: data });
// 查询分账流水详情
export const reqDivideDetail = data => request({ url: '/divide/getOrderDetail', method: 'GET', params: data });

// 分页获取门店自营标品数据
export const reqSelfStandardList = data => request({ url: '/stocktaking/details/selectSelf', method: 'GET', params: data });

// 全盘
export const reqAllList = data => request({ url: '/stocktaking/details/insertAll', method: 'POST', params: data });
// 取消全盘
export const reqAllCancel = data => request({url:'/stocktaking/details/deleteAll',method:'POST', data});
// 取消盘点商品
export const reqCancelStock = data => request({ url: '/stocktaking/details/delete', method: 'DELETE', data: { data: rsaEncrypt(data) } });
// 添加盘点商品
export const reqAddStock = data => request({ url: '/stocktaking/details/insert', method: 'POST', data: { data: rsaEncrypt(data) } });
// 分页获取去盘点商品列表
export const reqStockList = data => request({ url: '/stocktaking/details/selectGoStocktaking', method: 'GET', params: data });
// 创建自营盘点记录
export const reqCreateSelfStock = data => request({ url: '/stocktaking/insert', method: 'POST', data: { data: rsaEncrypt(data) } });
// 更新盘点商品信息
export const reqUpdateStock = data => request({ url: '/stocktaking/details/update', method: 'PUT', data: { data: rsaEncrypt(data) } });
// 分页获取自营盘点列表
export const reqSelfStockList = data => request({ url: '/stocktaking/select', method: 'GET', params: data });
// 分页获取自营盘点详情列表
export const reqSelfStockDetailList = data => request({ url: '/stocktaking/details/selectList', method: 'GET', params: data });
// 调拨单入库查询
export const reqDbdInwarehouseList = data => request({ url: '/inbound/getAllocationByNumber', method: 'GET', params: data });
// 调拨单入库
export const reqDbdInwarehouse = data => request({ url: '/inbound/allocationInsert', method: 'POST', data: { data: rsaEncrypt(data) } });